﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DAL;

namespace logic
{
    public class priceSeller
    {
        public static PriceSellerEntity getById(int psId)
        {
            return PriceSeller.getById(psId);
        }

        

        public static void updatePrice(PriceSellerEntity ps)
        {
            PriceSeller.updatePrice(ps);

        }

        public static void updatePriceV2(PriceSellerEntity ps)
        {
            PriceSeller.updatePriceV2(ps);
        }

        public static void updateUseByProduct(int productId)
        {
            PriceSeller.updateUseByProduct(productId);
        }
        public static DataSet select(string where, string orderby, int pagesize, int pageindex)
        {
            return DAL.DbHelper.ExecuteDataSetPageSize("*", "vw_PriceSeller_list", where, "psId", orderby, pagesize, pageindex);
        }

        public static DataSet selectWithColor(string where, string orderby, int pagesize, int pageindex)
        {
            return DAL.DbHelper.ExecuteDataSetPageSize("*", "[dbo].[vw_PriceSeller_listTrend_Color]", where, "psId", orderby, pagesize, pageindex);
        }

        public static DataSet getCurrenSellerPriceByProduct(int productId,string nature)
        {
            return PriceSeller.getCurrenSellerPriceByProduct(productId,nature);
        }

        public static DataSet getPriceSellerAmstock(int productId)
        {
            return PriceSeller.getPriceSellerAmstock(productId);
        }

        public static void sendMsgToManager(int categoryid,int sellerid)
        {
            PriceSeller.sendMsgToManager(categoryid,sellerid);
        }
    }
}
